﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq;
using System.Linq;

namespace ArmoryBrowser.Entities.Achievements
{
    public class Achievement
    {
        #region Fields
        private String _categoryIdField;
        private String _dateCompletedField;
        private String _descField;
        private String _iconField;
        private String _idField;
        private String _pointsField;
        private String _titleField;
        #endregion
        #region Properties
        public String CategoryId
        {
            get
            {
                return this._categoryIdField;
            }
            set
            {
                this._categoryIdField = value;
            }
        }
        public String DateCompleted
        {
            get
            {
                return this._dateCompletedField;
            }
            set
            {
                this._dateCompletedField = value;
            }
        }
        public String Desc
        {
            get
            {
                return this._descField;
            }
            set
            {
                this._descField = value;
            }
        }
        public String Icon
        {
            get
            {
                return this._iconField;
            }
            set
            {
                this._iconField = value;
            }
        }
        public String Id
        {
            get
            {
                return this._idField;
            }
            set
            {
                this._idField = value;
            }
        }
        public String Points
        {
            get
            {
                return this._pointsField;
            }
            set
            {
                this._pointsField = value;
            }
        }
        public String Title
        {
            get
            {
                return this._titleField;
            }
            set
            {
                this._titleField = value;
            }
        }
        #endregion
        #region Constructor
        public Achievement(XElement element)
        {
            CategoryId = element.GetAttributeValue("categoryId");
            DateCompleted = element.GetAttributeValue("dateCompleted");
            Desc = element.GetAttributeValue("desc");
            Icon = element.GetAttributeValue("icon");
            Id = element.GetAttributeValue("id");
            Points = element.GetAttributeValue("points");
            Title = element.GetAttributeValue("title");
        }
        #endregion
    }
}
